export default [
  { path: '/login', component: '@/pages/login', name: '登录' },
  {
    path: '/',
    component: '@/pages/index',
    wrappers: ['@/permission.js'],
    routes: [
      { path: '/', redirect: '/home', name: '首页' },
      {
        exact: true,
        path: '/home',
        component: '@/pages/home/index',
        name: '首页',
      },
      {
        path: '/home/pageview',
        component: '@/pages/home/report/pageview',
        name: '页面浏览人次',
      },
      {
        path: '/home/userview',
        component: '@/pages/home/report/userview',
        name: '用户浏览人次',
      },
      {
        path: '/home/setpage',
        component: '@/pages/home/setting/setpage',
        name: '页面设置',
      },
      {
        path: '/home/setlanguage',
        component: '@/pages/home/setting/setlanguage',
        name: '语言设置',
      },
      {
        path: '/about',
        component: '@/pages/about/index',
        exact: true,
      },
      {
        path: '/goods',
        component: '@/pages/goods/index',
        exact: true,
      },
      {
        path: '/users',
        component: './users/_layout',
        routes: [
          { path: '/users/', component: './users/index' },
          { path: '/users/:name', component: './users/$name' },
        ],
      },
      {
        component: '@/pages/404/index',
      },
    ],
  },
];
